﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Maticsoft.DBUtility;
using System.Data;


namespace Maticsoft.DAL.CarrefourCover
{  
    public partial class RiseBaby
    {
        /// <summary>
        /// 随机获得前几行数据
        /// </summary>
        public DataSet GetRandomModelList(int Top, string strWhere)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select ");
            if (Top > 0)
            {
                strSql.Append(" top " + Top.ToString());
            }
            strSql.Append(" * ");
            strSql.Append(" FROM RiseBaby ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            strSql.Append(" order by newid()");
            return DbHelperSQL.Query(strSql.ToString());
        }
    }
}
